﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace NewRen.Models.ViewModel
{
    public class vMessageBoard
    {
        public int ID { get; set; }

        /// <summary>
        /// 发布者
        /// </summary>
        public int FromUserID { get; set; }

        public User FromUser { get; set; }
        /// <summary>
        /// 被留言者
        /// </summary>
        public int ToUserID { get; set; }
        public User ToUser { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 时间
        /// </summary>

        public string Time { get; set; }

        public vMessageBoard() { }

        public vMessageBoard(MessageBoard model)
        {
            this.ID = model.ID;
            this.FromUserID = model.FromUserID;
            this.ToUserID = model.ToUserID;
            this.Description = model.Description;
            this.Time = Helpers.Time.ToTimeTip(model.Time);
            this.FromUser = model.FromUser;
            this.ToUser = model.ToUser;
        }

    }
}